<template>
    <view>
        <!-- #ifdef MP-WEIXIN -->
            <top-nav :inner-title="title" is-show-back="true" is-fixed="true" :navH="navH" :n="n" is-white="bg-gray" opacity="1"></top-nav> 
            <view :style="{height:navH + 'px'}"></view>
        <!-- #endif -->
        <view class="content">
            <view class="title">
                <view class="line"></view>
                <text>看看大家点了什么</text>
                <view class="line"></view>
            </view>
            <view class="list">
                <block v-for="(item,index) in list">
                    <view class="item">
                        <view class="avatar">
                            <image src="http://juhuijia2.birdback.org/mapi/i/face1@3x.png"></image>
                        </view>
                        <view class="intro">
                            <view class="nickname">{{item.nickname}}</view>
                            <view class="time">{{item.add_time}}下单</view>
                        </view>
                        <view class="goods-info">{{item.goods_list}}…</view>
                    </view>
                </block>
            </view>
        </view>
    </view>
</template>

<script>
	import request from '../../../common/request.js';
	import $api_base from '../../../api/api_base.js';
	import topNav from '@/template/topnav/index.vue';
    export default {
		components: { topNav },
		data() {
			return {
				title:'同学快跑',
                navH:0,
                n:0,
                list: []
			}
		},
		onLoad(options){
            let pages     = getCurrentPages();
            let prevPage  = pages[pages.length - 2];
            prevPage.$vm.fromPage = 'storeSearch';
			this.navH     = getApp().globalData.navHeight;
            this.n        = getApp().globalData.n;
            var storeId = options.storeId || 415;
            var self = this;
             $api_base.post($api_base.getHistoryGroupOrder,{store_id: storeId}).then(function(res){
                let data = res.data;
                if (data.ok == 1) {
                    self.list = data.list;
                }
            });
        },
	}
</script>
<style>
    page{
        background-color: #fff;
    }
</style>
<style lang="scss" scoped>
	@import 'index.scss';
</style>
